package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.joda.time.DateTime;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author wangchao
 * @since 2020-11-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("news")
public class News extends Model<News> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 资讯id
     */
    @TableId(value = "newsId", type = IdType.AUTO)
    private Integer newsId;

    /**
     * 外来主键
     */
    @TableField("cmsId")
    private String cmsId;

    /**
     * 栏目id
     */
    @TableField("columnId")
    private Integer columnId;

    /**
     * 0下架 1上架	2.加工中/拦截态, 3.审核通过可分发 4.pgc视频 5.审核不通过 6.待人工审核 7.待腾讯云审核
     */
    private Integer state;

    /**
     * 1图文 2短视频
     */
    @TableField("newsType")
    private Integer newsType;

    /**
     * 发文时间 秒
     */
    @TableField("pubTime")
    private Long pubTime = DateTime.now().getMillis() / 1000L;

    /**
     * 标题
     */
    private String title;

    /**
     * 副级标题
     */
    private String secondary;

    /**
     * 作者
     */
    private String author;

    /**
     * 内容
     */
    @TableField("contentHtml")
    private String contentHtml;

    /**
     * 导语
     */
    @TableField("htmlIntro")
    private String htmlIntro;

    /**
     * 结束语
     */
    @TableField("htmlRemark")
    private String htmlRemark;

    /**
     * 文章内容类型，0：普通文章，1：组图文章
     */
    @TableField("articleType")
    private Integer articleType;

    /**
     * 封面图（展示类型+图片链接）ImgExpType=1，小图，尺寸（196-130）; ImgExpType=2，大图，尺寸（（600-312））; ImgExpType=3，组图（三图），尺寸（150-120）; ImgExpType=4,作者指定展示为无图 ImgExpType=0或-1,作者没有指定封面图，ConverPic取一张默认图片兜底 封面图链接（若为组图，以逗号分隔）
     */
    private String cover;

    /**
     * 是否为原创
     */
    @TableField("isOrg")
    private Boolean org;

    /**
     * 类型ID
     */
    @TableField("typeId")
    private Integer typeId;

    /**
     * 关键词
     */
    @TableField("keyWords")
    private String keyWords;

    /**
     * 来源
     */
    private String source;

    /**
     * 介绍
     */
    private String content;

    /**
     * 时长
     */
    private String duration;

    /**
     * 文件大小
     */
    @TableField("fileSize")
    private String fileSize;

    /**
     * 短视频封面图
     */
    @TableField("picMinivideo")
    private String picMinivideo;

    /**
     * 视频ID
     */
    @TableField("vId")
    private String vId;

    /**
     * 播放key
     */
    @TableField("vKey")
    private String vKey;

    /**
     * 创建时间 秒
     */
    @TableField("cTime")
    private Long cTime = DateTime.now().getMillis() / 1000L;

    /**
     * 排序
     */
    private Integer seq;

    /**
     * 地域名称
     */
    private String location;

    /**
     * 上传视频ID
     */
    @TableField("fileId")
    private String fileId;

    /**
     * 是否显示地域
     */
    private Boolean region;

    /**
     * 视频播放地址
     */
    private String url;

    private String tags;

    @TableField(exist = false)
    private String tagIds;

    @TableField("likeNum")
    private Integer likeNum;

    @TableField("playNum")
    private Integer playNum;

    @TableField("baseLike")
    private Integer baseLike;

    @TableField("basePlay")
    private Integer basePlay;

    /**
     * 发布时间
     */
    @TableField("release_time")
    private Date releaseTime;

    /**
     * 机审结果 1:正常 5:违规 6:疑似
     */
    @TableField("audit_results_type")
    private Integer auditResultsType;

    /**
     * 腾讯云审核视频内容审核人id
     */
    private String reviewId;

    /**
     * 上传视频比例
     */
    private String videoProportion;

    /**
     * 逻辑删除 0:已删除 1:未删除
     */
    private Integer deleted;

    /**
     * 用户id
     */
    private Integer memberId;

    /**
     * 视频来源 0:pgc  1:ugc
     */
    private Integer videoSource;

    /**
     * pgc视频下是否优先推荐 0:推荐 1:不推荐
     */
    private Integer pgcRecommend;

    /**
     * 位置标签
     */
    private String positio;

    /**
     * 置顶
     */
    private Integer top;


    public static final String POSITIO = "positio";

    public static final String NEWSID = "newsId";

    public static final String CMSID = "cmsId";

    public static final String COLUMNID = "columnId";

    public static final String STATE = "state";

    public static final String NEWSTYPE = "newsType";

    public static final String PUBTIME = "pubTime";

    public static final String TITLE = "title";

    public static final String SECONDARY = "secondary";

    public static final String AUTHOR = "author";

    public static final String CONTENTHTML = "contentHtml";

    public static final String HTMLINTRO = "htmlIntro";

    public static final String HTMLREMARK = "htmlRemark";

    public static final String ARTICLETYPE = "articleType";

    public static final String COVER = "cover";

    public static final String ISORG = "isOrg";

    public static final String TYPEID = "typeId";

    public static final String KEYWORDS = "keyWords";

    public static final String SOURCE = "source";

    public static final String CONTENT = "content";

    public static final String DURATION = "duration";

    public static final String FILESIZE = "fileSize";

    public static final String PICMINIVIDEO = "picMinivideo";

    public static final String VID = "vId";

    public static final String VKEY = "vKey";

    public static final String CTIME = "cTime";

    public static final String SEQ = "seq";

    public static final String LOCATION = "location";

    public static final String FILEID = "fileId";

    public static final String REGION = "region";

    public static final String URL = "url";

    public static final String TAGS = "tags";

    public static final String LIKENUM = "likeNum";

    public static final String PLAYNUM = "playNum";

    public static final String BASELIKE = "baseLike";

    public static final String BASEPLAY = "basePlay";

    public static final String RELEASE_TIME = "release_time";

    public static final String AUDIT_RESULTS_TYPE = "audit_results_type";

    public static final String REVIEW_ID = "review_id";

    public static final String VIDEO_PROPORTION = "video_proportion";

    public static final String DELETED = "deleted";

    public static final String MEMBER_ID = "member_id";

    public static final String VIDEO_SOURCE = "video_source";

    public static final String PGC_RECOMMEND = "pgc_recommend";

    public static final String TOP = "top";

    @Override
    protected Serializable pkVal() {
        return this.newsId;
    }

}
